@extends('admin.layout.index')
@section('content')
	<div class="mws-panel grid_8">
                	<div class="mws-panel-header">
                    	<span><i class="icon-table"></i> 分类浏览</span>
                    </div>
                	
                    <div class="mws-panel-body no-padding">
                        <table class="mws-table">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>分类名称</th>
                                    <th>父级id</th>
                                    <th>分类路径</th>
                                    <th>分类状态</th>     
                                </tr>
                            </thead>
                            <tbody>
                            	@foreach($data as $k => $v)
                                <tr>
                                    <td height="40px">{{ $v['id'] }}</td>
                                    <td>{{ $v['name'] }}</td>
                                    <td>{{ $v['pid'] }}</td>
                                    <td>{{ $v['path'] }}</td>
                                    <td>
                                    	@if($v['status'] == 1) 
                                    	<a href="/admin/cate/update?id={{$v['id']}}&a=2" title="点击关闭">开通</a>
										
                                    	@else
                                    	<a href="/admin/cate/update?id={{$v['id']}}&a=1" title="点击开通">关闭</a>
                                    	@endif
                                    	&nbsp;&nbsp;
										<a href="/admin/cate/add/{{$v['id']}}" title="添加子分类">添加</a>
                                    </td>
                                </tr>
                                @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>
@endsection